package com.moon.project.service.impl.inner;

import com.moon.common.model.entity.UserInterfaceInfo;
import com.moon.common.service.InnerUserInterfaceInfoService;
import com.moon.project.service.UserInterfaceInfoService;
import org.apache.dubbo.config.annotation.DubboService;

import javax.annotation.Resource;

/**
 * 作者博客：<a href="https://blog.csdn.net/weixin_65935065">https://blog.csdn.net/weixin_65935065</a>
 * @author 苦行修士
 */
@DubboService
public class InnerUserInterfaceInfoServiceImpl implements InnerUserInterfaceInfoService {

    @Resource
    private UserInterfaceInfoService userInterfaceInfoService;
    /**
     * 接口调用次数统计、调用接口+1
     *
     * @param userId
     * @param interfaceInfoId
     * @return
     */
    @Override
    public boolean invokeInterfaceInfoCount(long userId, long interfaceInfoId) {

        return userInterfaceInfoService.invokeInterfaceInfoCount(userId, interfaceInfoId);
    }

    /**
     * 获取调用接口信息
     *
     * @param userId
     * @param interfaceInfoId
     * @return
     */
    @Override
    public UserInterfaceInfo getUserInterfaceInfo(long userId, long interfaceInfoId) {
        return userInterfaceInfoService.getUserInterfaceInfo(userId, interfaceInfoId);
    }

}
